package cn.lger.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.lang.NonNull;

/**
 * 管理员实体
 *
 * @author Pro
 * @date 2018-06-13.
 */
@ApiModel(description = "管理员实体")
public class Administrator {
    @ApiModelProperty(value = "管理员id")
    private int id;
    @NonNull
    @ApiModelProperty(value = "管理员名", required = true)
    private String username;
    @NonNull
    @ApiModelProperty(value = "密码，返回数据不显示", required = true)
    @JsonIgnore
    private String password;
    @ApiModelProperty(value = "管理员邮箱")
    private String email;
    @ApiModelProperty(hidden = true)
    private String superadmin;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getSuperadmin() {
        return superadmin;
    }

    public void setSuperadmin(String superadmin) {
        this.superadmin = superadmin;
    }

    /**
     * 普通管理员
     */
    @JsonIgnore
    public static final String SUPER = "yes";
    /**
     * 超级管理员
     */
    @JsonIgnore
    public static final String NORMAL = "no";

}
